package com.hissy.cn.mongodb;

import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.mapping.Document;

/**
 * @author zhangyanfei
 * @date 2019/11/29
 **/
@Document("demo")
@Data
@NoArgsConstructor
public class MongoUser {
    @Id
    private String id;

    private String userName;

    private Integer age;

    public MongoUser(String userName, Integer age) {
        this.userName = userName;
        this.age = age;
    }
}
